package com.htstar.ovms.device.api.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.htstar.ovms.common.excel.util.LocalDateTimeConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@ContentRowHeight(15)
@HeadRowHeight(20)
@ColumnWidth(25)
public class DeviceTripExcelVO {
    @ExcelIgnore
    private static final long serialVersionUID = 1L;

    @ExcelProperty(value = "车牌号")
    @ApiModelProperty(value = "车牌号")
    private String licCode;

    @ExcelProperty(value = "机构名称")
    @ApiModelProperty(value = "企业名称")
    private String etpName;

    /**
     * 行程开始位置
     */
    @ExcelProperty(value = "起点")
    @ApiModelProperty(value = "行程开始位置")
    private String staAddr;
    /**
     * 行程结束位置
     */
    @ExcelProperty(value = "终点")
    @ApiModelProperty(value = "行程结束位置")
    private String endAddr;

    /**
     * 行程开始时间
     *
     * @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "UTC")
     */
    @ExcelProperty(value = "行程开始时间", converter = LocalDateTimeConverter.class)
    @ApiModelProperty(value = "行程开始时间")
    private LocalDateTime staTime;

    /**
     * 行程结束时间
     *
     * @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "UTC")
     */
    @ExcelProperty(value = "行程结束时间", converter = LocalDateTimeConverter.class)
    @ApiModelProperty(value = "行程结束时间")
    private LocalDateTime endTime;


    /**
     * 里程（米）
     */
    @ApiModelProperty(value = "里程（米）")
    @ExcelProperty(value = "里程（km）")
    private String mileage;

    @ApiModelProperty(value = "行程时间长度")
    @ExcelProperty(value = "时长")
    private String timeLong;
    /**
     * 油耗
     */
    @ApiModelProperty(value = "油耗")
    @ExcelProperty(value = "油耗（L）")
    private BigDecimal fuelConsumption;


    @ApiModelProperty(value = "一次行程急加速的次数")
    @ExcelProperty(value = "急加速（次）")
    private Integer sharpAccelerate;

    @ApiModelProperty(value = "一次行程急减速的次数")
    @ExcelProperty(value = "急减速（次）")
    private Integer sharpSlowdown;

    @ApiModelProperty(value = "一次行程急转弯的次数")
    @ExcelProperty(value = "急转弯（次）")
    private Integer sharpSwerve;

    @ApiModelProperty(value = "一次行程超速的次数")
    @ExcelProperty(value = "超速（次）")
    private Integer overSpeed;

    @ExcelProperty(value = "查勘员")
    @ApiModelProperty(value = "用车人")
    private String nickName;
}

